package com.xfsg.core.operationlog.beans;

import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @Classname LogRecord
 * @Description TODO
 * @date 2022/1/19 21:01
 * @author ZhangYi
 */
@Setter
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class LogRecord {
    private String id;
    private String tenant;
    private String serviceId;
    @NotBlank(message = "bizKey required")
    @Length(max = 200, message = "bizKey max length is 200")
    private String bizKey;

    @NotBlank(message = "bizNo required")
    @Length(max = 200, message = "bizNo max length is 200")
    private String bizNo;

    private String operator;

    @NotBlank(message = "operator required")
    @Length(max = 60, message = "operator max length 60")
    private String operatorId;

    @NotBlank(message = "action required")
    @Length(max = 560, message = "success max length 560")
    private String action;

    private String category;
    private Date createTime;
    private String detail;
}